//
//  HistoryTransaction.m
//  MHO
//
//  Created by Hien NV on 12/14/14.
//  Copyright (c) 2014 maihoang. All rights reserved.
//

#import "HistoryTransaction.h"
#import "Lib.h"

@implementation HistoryTransaction
+ (HistoryTransaction*)historyTransactionWithDictionary:(NSDictionary *)dictionary {
    return [[self alloc] initWithDictionary:dictionary];
}

- (id)initWithDictionary:(NSDictionary *)dictionary {
    self = [super init];
    if (self) {
        self.transactionDate = strCheckNull(dictionary[@"TransactionDate"]);
        self.value = strCheckNull(dictionary[@"Value"]);
        self.descript = strCheckNull(dictionary[@"Description"]);
        self.isSuccess = [numberCheckNull(dictionary[@"IsSuccess"]) boolValue];
    }
    return self;
}
@end
